﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace EasyTest.Application.Service.QuestionBank.Dto;

/// <summary>
/// 题目分类基础输入参数
/// </summary>
public class EtQuestionCateBaseInput
{
    /// <summary>
    /// 名称
    /// </summary>
    public virtual string Name { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    public virtual string Description { get; set; }

    /// <summary>
    /// 状态
    /// </summary>
    public virtual int Status { get; set; }

    /// <summary>
    /// 父级分类
    /// </summary>
    public virtual long? ParentId { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public virtual int OrderNo { get; set; }

    /// <summary>
    /// 租户Id
    /// </summary>
    public virtual long? TenantId { get; set; }

    /// <summary>
    /// 创建者部门Id
    /// </summary>
    public virtual long? CreateOrgId { get; set; }

    /// <summary>
    /// 创建者部门名称
    /// </summary>
    public virtual string CreateOrgName { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public virtual DateTime? CreateTime { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public virtual DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 创建者Id
    /// </summary>
    public virtual long? CreateUserId { get; set; }

    /// <summary>
    /// 创建者姓名
    /// </summary>
    public virtual string CreateUserName { get; set; }

    /// <summary>
    /// 修改者Id
    /// </summary>
    public virtual long? UpdateUserId { get; set; }

    /// <summary>
    /// 修改者姓名
    /// </summary>
    public virtual string UpdateUserName { get; set; }

    /// <summary>
    /// 软删除
    /// </summary>
    public virtual bool IsDelete { get; set; }

    public virtual long QuestionBankId { get; set; }

}

/// <summary>
/// 题目分类分页查询输入参数
/// </summary>
public class PageEtQuestionCateInput : BasePageInput
{
    /// <summary>
    /// 关键字查询
    /// </summary>
    public string SearchKey { get; set; }

    /// <summary>
    /// 名称
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    /// 父级分类
    /// </summary>
    public long? ParentId { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int? OrderNo { get; set; }

}

/// <summary>
/// 题目分类增加输入参数
/// </summary>
public class AddEtQuestionCateInput
{
    /// <summary>
    /// 名称
    /// </summary>
    [Required(ErrorMessage = "名称不能为空")]
    public string Name { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    public string? Description { get; set; }

    /// <summary>
    /// 状态
    /// </summary>
    public StatusEnum Status { get; set; } = StatusEnum.Enable;

    /// <summary>
    /// 父级ID
    /// </summary>
    public long ParentId { get; set; } = 0;

    /// <summary>
    /// 排序
    /// </summary>
    public int OrderNo { get; set; } = 100;

    /// <summary>
    /// 题库ID
    /// </summary>
    [Required(ErrorMessage = "题库ID不能为空")]
    public long QuestionBankId { get; set; }
}

/// <summary>
/// 题目分类删除输入参数
/// </summary>
public class DeleteEtQuestionCateInput : BaseIdInput
{
    /// <summary>
    /// 是否删除子分类
    /// </summary>
    public bool DeleteChildren { get; set; }
}

/// <summary>
/// 题目分类更新输入参数
/// </summary>
public class UpdateEtQuestionCateInput : AddEtQuestionCateInput
{
    /// <summary>
    /// ID
    /// </summary>
    [Required(ErrorMessage = "ID不能为空")]
    public long Id { get; set; }
}

/// <summary>
/// 题目分类主键查询输入参数
/// </summary>
public class QueryByIdEtQuestionCateInput : DeleteEtQuestionCateInput
{

}
